package framework;

import javax.microedition.khronos.opengles.GL10;

import android.hardware.SensorEvent;
import android.view.MotionEvent;

public abstract class GameScreen {
	
	public static enum State {
		PLAY,
		PAUSE,
		GAME_OVER
	}
	
	protected State currentState = State.PAUSE;
	
	protected Game game;
	
	public GameScreen(Game game) {
		this.game = game;
		initScreenObjects();
	}
	
	protected abstract void initScreenObjects();
	
	public abstract void present(GL10 gl, float deltaTime);
	
	public abstract void update(float deltaTime);
	
	public void setState(State state) {
		currentState = state;
	}

	public abstract void handleTouchEvent(MotionEvent event);

	public abstract void handleAccelerometerEvent(SensorEvent event);

}
